package edu.cqie.smartfarm.dto;

import edu.cqie.smartfarm.verify.anno.Status;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotNull;

@ApiModel(value = "围栏DTO对象", description = "围栏DTO对象")
@Data
public class FenceDTO {

    @ApiModelProperty(value = "牧场ID")
    @NotNull(message = "牧场不能为空")
    private Integer farmId;

    @ApiModelProperty(value = "圈舍ID")
    @NotNull(message = "圈舍不能为空")
    private Integer barnId;

    @ApiModelProperty(value = "围栏名称")
    @Length(max = 20, message = "围栏名称长度最多20个字符")
    @NotNull(message = "围栏名称不能为空")
    private String fenceName;

    @ApiModelProperty(value = "状态，布尔值（0或1），1代表启用，0代表停用，默认为启用状态")
    @Status
    private Integer status;
}
